package com.gulimall.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.common.utils.PageUtils;
import com.gulimall.product.entity.SkuInfoEntity;
import com.gulimall.product.entity.SpuInfoEntity;
import com.gulimall.product.vo.SkuItemVO;
import com.gulimall.product.vo.Skus;

import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ExecutionException;

/**
 * sku信息
 *
 * @author Ren
 * @email jackren546@gmail.com
 * @date 2024-12-31 13:14:01
 */
public interface SkuInfoService extends IService<SkuInfoEntity> {

    PageUtils queryPage(Map<String, Object> params);

    PageUtils queryPageByCondition(Map<String, Object> params);

    List<SkuInfoEntity> getSkuBySpuId(Long spuId);
    /**
     * 新增sku信息
     */
    void saveSkuInfo(SpuInfoEntity spuInfo, List<Skus> skus);


    /**
     * 查询skuId商品信息，封装VO返回
     */
    SkuItemVO item(Long skuId) throws ExecutionException, InterruptedException;

    /**
     * 根据集合查询
     */
    List<SkuInfoEntity> getByIds(Collection<Long> skuIds);

}

